<template>
  <div class="app-container">
    <el-row>

      <el-col :span="24" :xs="24" class="card-box">
        <el-card>
          <div slot="header">
            <span>hdfs服务配置信息</span>
          </div>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <table cellspacing="0" style="width: 100%;">
              <thead>
              <tr>
                <th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
                <th class="el-table__cell is-leaf"><div class="cell">值</div></th>
              </tr>
              </thead>
              <tbody v-for="confItem in hdfsConf">
              <tr>
                <td class="el-table__cell is-leaf"><div class="cell">{{ confItem[0] }}</div></td>
                <td class="el-table__cell is-leaf"><div class="cell">{{ confItem[1] }}</div></td>
              </tr>
              </tbody>
            </table>
          </div>
        </el-card>
      </el-col>

    </el-row>
  </div>
</template>

<script>

import {hdfsConfGet} from "@/api/hdfs";

export default {
  name: "server",
  data() {
    return {
      // 服务器信息
      hdfsConf: []
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询服务器信息 */
    getList() {
      hdfsConfGet().then(
        res=>{
          this.hdfsConf = Object.entries(res.data)
          console.log(Object.entries(res.data)[0])
        }
      )
    },

  }
};
</script>
